
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using MonoTouch.UIKit;

namespace RssReader
{

	public partial class NavigationController : UINavigationController
	{

		public NavigationController (IntPtr ptr) : base(ptr)
		{
		}

		public override void PushViewController (UIViewController viewController, bool animated)
		{
			base.PushViewController (viewController, animated);
		}
		private UITextField _textField;
		
		public override bool ToolbarHidden {
			get {
				return base.ToolbarHidden;
			}
			set {
				ToolbarItems = new UIBarButtonItem[]{new UIBarButtonItem(_textField)};
				base.ToolbarHidden = value;
			}
		}





		public override void ViewDidLoad ()
		{
			
			_textField = new UITextField ();
			_textField.Text = "King Alfonso III";
			_textField.Bounds = this.Toolbar.Bounds;
			_textField.Placeholder = "Username";
			_textField.ShouldReturn = delegate {
				_textField.ResignFirstResponder ();
				return true;
			};
			View.AddSubview (_textField);
			
			base.ViewDidLoad ();
			
		}
	}
}
